import request from '@/utils/request';

// 获取疾病分类列表
export const getDiseaseList = (params) => {
  return request({
    url: '/category',
    method: 'get',
    params
  });
};

// 创建疾病分类
export const createDisease = (data) => {
  return request({
    url: '/category',
    method: 'post',
    data
  });
};

// 更新疾病分类
export const updateDisease = (id, data) => {
  return request({
    url: `/category/${id}`,
    method: 'put',
    data
  });
};

// 删除疾病分类
export const deleteDisease = (id) => {
  return request({
    url: `/category/${id}`,
    method: 'delete'
  });
};